﻿
using System;
using System.Linq;
using System.Text;
using SqlSugar;

namespace Oliving.Edge.Model.Models.MQXT
{
    ///<summary>
    ///
    ///</summary> 

    [SugarTable("MQXT_JiZhongQiModel")]
    [Serializable]
    public class MQXT_JiZhongQiModel
    {
        public MQXT_JiZhongQiModel()
        {
        }


        [SugarColumn(IsIgnore = true)]
        public string State
        {
            get
            {
                if (UpdateTIme > DateTime.Now.AddMinutes(-5))
                {
                    return "在线";
                }
                else
                {
                    return "离线";
                }
            }
        }


        /// <summary> 
        /// Desc: 
        /// Default: 
        /// Nullable:False 
        /// </summary> 

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "Id")]
        public int Id { get; set; }

        /// <summary> 
        /// Desc: 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        [SugarColumn(ColumnName = "Addr", IsNullable = true, Length = 255, ColumnDataType = "nvarchar")]
        public string Addr { get; set; }

        /// <summary> 
        /// Desc: 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        [SugarColumn(ColumnName = "SIM", IsNullable = true, Length = 255, ColumnDataType = "nvarchar")]
        public string SIM { get; set; }

        /// <summary> 
        /// Desc: 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        [SugarColumn(ColumnName = "Yb", IsNullable = true, Length = 255, ColumnDataType = "nvarchar")]
        public string Yb { get; set; }

        /// <summary> 
        /// Desc: 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        [SugarColumn(ColumnName = "GPS", IsNullable = true, Length = 255, ColumnDataType = "nvarchar")]
        public string GPS { get; set; }

        /// <summary> 
        /// Desc: 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        [SugarColumn(ColumnName = "UpdateTIme", IsNullable = true)]
        public DateTime? UpdateTIme { get; set; }

    }

}
